package com.mcptt.config;


public class VideoConfig {

	public static final String VideoResolving_Desc_QVGA = "320*240";
	public static final String VideoResolving_Desc_CIF = "352*288";
	public static final String VideoResolving_Desc_VGA = "640*480";
	public static final String VideoResolving_Desc_720P = "1024*768";
	
	public static final int VideoResolving_QVGA = 0;
	public static final int VideoResolving_CIF = 1;
	public static final int VideoResolving_VGA = 2;
	public static final int VideoResolving_720P = 3;
	
	private static String[] VideoResolvingArr = {VideoResolving_Desc_QVGA,VideoResolving_Desc_CIF,VideoResolving_Desc_VGA,VideoResolving_Desc_720P};
	private int videoResolving = VideoResolving_VGA;
	
	public VideoConfig(int videoResolving)
	{
		this.videoResolving = videoResolving;
	}
	
	
	public void setVideoResolving(int videoResolving) {
		this.videoResolving = videoResolving;
	}
	public int getVideoResolving() 
	{
		return videoResolving;
	}

	public String getVideoResolvingDesc() 
	{
		if(videoResolving < 0
				|| videoResolving > VideoResolvingArr.length)
		{
			return "";
		}
		return VideoResolvingArr[videoResolving];
	}
	
	public static String getVideoResolvingDesc(int videoResolving) 
	{
		if(videoResolving < 0
				|| videoResolving > VideoResolvingArr.length)
		{
			return "";
		}
		return VideoResolvingArr[videoResolving];
	}

	public static String[] getVideoResolvingArr() {
		return VideoResolvingArr;
	}

	
	public String toString() 
	{
		StringBuffer strBuff = new StringBuffer("VideoConfig:");
		strBuff.append("videoResolving = ").append(getVideoResolving()).append(";");

		return strBuff.toString();
	}
}
